use crate::db::db::Db;

pub fn drop_tables() {
    let db = Db::open();
    let rt1 = db.exec("drop table","drop table im_department;");
    log::info!("drop im_department result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_session;");
    log::info!("drop im_session result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_group;");
    log::info!("drop im_group success result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_group_user;");
    log::info!("drop im_group_user result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_user;");
    log::info!("drop im_user result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_message;");
    log::info!("drop im_message result: {}", rt1);

    let rt1 = db.exec("drop table","drop table im_message_send;");
    log::info!("drop im_message_send result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_setting;");
    log::info!("drop im_setting result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_cache_login_user;");
    log::info!("drop im_cache_login_user result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_sensitive_word;");
    log::info!("drop im_sensitive_word result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_module;");
    log::info!("drop im_module result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_module_item;");
    log::info!("drop im_module_item result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_collect;");
    log::info!("drop im_collect result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_label;");
    log::info!("drop im_label result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_file;");
    log::info!("drop im_file result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_config;");
    log::info!("drop im_config result: {}", rt1);
    
    let rt1 = db.exec("drop table","drop table im_feedback;");
    log::info!("drop im_feedback result: {}", rt1);
    
    log::info!("drop all success");
    drop(db);
}